package net.zjitc.Enum;

/**
 * @Author admin
 * @Date 2019/4/2 8:27
 */
public enum Season {
//    name:     ;ordinal:       ;
//    实例    实例之间用逗号隔开
//    SPRING,SUMMER,FALL,WINTER;
//    默认值从0开始
//    按顺序赋值
    SPRING("spring",1),
    SUMMER("summer",2),
    FALL("fall",3),
    WINTER("winter",4);


    private String name;
    private int num;


    Season(String name, int num) {
        this.name = name;
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public int getNum() {
        return num;
    }}
